package com.huluobo.a2110mvpimdemo.splash;

import com.huluobo.a2110mvpimdemo.base.BasePresenter;
import com.hyphenate.chat.EMClient;

/**
 * Created by LC on 2023/12/12.
 */
public class SplashPresenter extends BasePresenter<SplashContract.View> implements SplashContract.Presenter {
    @Override
    public void checkIsLoggedInBefore() {
        if (isLoggedIn()) {
            if (isAttach()) {
                getView().isLoggedIn();
            }
        } else {
            if (isAttach()) {
                getView().isNotLoggedIn();
            }
        }
    }

    private boolean isLoggedIn() {
        return EMClient.getInstance().isLoggedIn();
    }
}
